Field of the Invention
The present invention relates to control of an information processing apparatus such as an image forming apparatus or the like which can switch a plurality of electric power states and can operate.
Description of the Related Art
In information processing apparatuses such as an image forming apparatus and the like in recent years, there is an apparatus having a function called “suspend” in which the operation of a program being executed or the like is set into a rest state so that electric power consumption when the apparatus is not used is reduced and that the apparatus can be returned in an operating state similar to a current operating state. There is also an apparatus having a function called “resume” in which the apparatus is returned to a state immediately before the operation is rested by a user's operation or a request such as a print job or the like from a network.
According to the foregoing suspend function, in the state immediately before the operation is rested, a device driver of a kernel stores a state of the device into a memory and each service is interrupted. According to the resume function, by returning the state of the device stored in the memory before, states of almost all devices can be returned to the states immediately before and the apparatus can be returned the state immediately before the operation is rested.
According to Japanese Patent Application Laid-Open No. 2000-284974, in a device such as a network or the like which has to be operated even in suspend, an interruption which was being processed by software is switched to hardware which operates in suspend, thereby enabling a service to be continued even in suspend.
According to the image forming apparatus in the related art, for example, a print job which is transmitted from an external host PC (personal computer) through a network can be recognized as a print job for the first time by processing a plurality of network packets (hereinbelow, referred to as packets) by software. However, in the image forming apparatus, if the packet is received immediately before the apparatus enters a suspend mode, there is a case where the apparatus enters the suspend mode before the packet is analyzed and recognized as a print job. In such a case, if the remaining packets are transmitted from the host PC, the image forming apparatus receives them, is returned from the suspend mode, and can restart an analyzing process of the packet.
However, in the case of a very small print job, there is a possibility that the packet transmission from the host PC has already been finished. In such a case, it is not guaranteed that a new packet is transmitted from the host PC. Therefore, in the image forming apparatus, there is a possibility that the suspend mode is maintained and the analyzing process itself of the packet is stopped. In this case, there is a possibility of occurrence of such a phenomenon that in spite of a fact that the transmission of the print job from the host PC has already been completed, the image forming apparatus enters the suspend state while holding the packet and a printing is not performed at all. In this case, although the printing of the job can be performed by returning the apparatus by directly operating the apparatus by the user or the like, it is troublesome for the user. A case where since the printing is not performed, the user transmits the job again is considered. However, in this case, the printing of both of the job which had been transmitted before and the job which was transmitted again is performed irrespective of a user's intention.
The invention is made to solve the foregoing problem. It is an aspect of the invention to provide such a mechanism that a request received from an outside immediately before an apparatus is shifted to a power saving state such as a suspend state or the like can be automatically processed without causing a troublesomeness to the user.